﻿@model IList<Shop.Order.Models.AnyOrderDetail>
@{
    //管理员订单管理-订单详情
    Layout = null;
}

<tr>
    <td>#</td>
    <td>商品名</td>
    <td>商品图片</td>
    <td>单价</td>
    <td>数量</td>
    <td>买家姓名</td>
    <td>买家联系方式</td>
    @*<td>送货地址</td>*@
    <td>下单时间</td>
    <td>订单状态</td>
    <td>订单总金额</td>
</tr>
@{Shop.Order.Models.Order OInfo = ViewBag.OInfo; int i = 0;}
@foreach (var item in Model)
{
    if (i == 0)
    {
        <tr>
            <td>@(i + 1)</td>
            <td>@item.WName</td>
            <td>
                <img src="@item.Url" style="width:40px;height:40px;" />
            </td>
            <td>@item.UnitPrice</td>
            <td>@item.BuyNum (件)</td>
            <td rowspan="@(Model.Count )">@OInfo.UName</td>
            <td rowspan="@(Model.Count )">@OInfo.Tel</td>
            @*<td rowspan="@(Model.Count )">@OInfo.Address</td>*@
            <td rowspan="@(Model.Count )">@OInfo.CreateDate</td>
            <td rowspan="@(Model.Count )">@(OInfo.IfPay == 0 ? "已支付" : "未支付")</td>
            <td rowspan="@(Model.Count )">@OInfo.MoneyTotal 元</td>
            
        </tr>
    }
    else
    {
        <tr>
            <td>@(i + 1)</td>
            <td>@item.WName</td>
            <td>
                <img src="@item.Url" style="width:40px;height:40px;" />
            </td>
            <td>@item.UnitPrice</td>
            <td>@item.BuyNum (件)</td>
        </tr>
    }
    i++;
}
<script type="text/javascript">
</script>
